Skip to content

Fix timestamp links in video descriptions#2536

Closed
nyanpasu64 wants to merge 2 commits intoTeamNewPipe:devfrom
nyanpasu64:fix-description-timestamps
Closed

Fix timestamp links in video descriptions#2536
nyanpasu64 wants to merge 2 commits intoTeamNewPipe:devfrom
nyanpasu64:fix-description-timestamps

Conversation

@nyanpasu64
Copy link
Contributor

@nyanpasu64 nyanpasu64 commented Aug 18, 2019

Video description timestamp links have link text which is not a URL. I submitted a PR adding the ability to properly parse timestamp links into <a href="...&t=0">00:00</a> at TeamNewPipe/NewPipeExtractor#188. However, the NewPipe front-end videoDescriptionView erases all Spanned links if their text is not a URL.

videoDescriptionView.setAutoLinkMask(Linkify.WEB_URLS); is intended to turn textual URLs into links. For some reason, on my Moto G5 Plus running Android 7.0, it causes Spanned hyperlinks to disappear if the text is not a URL. This PR removes that function call.

Will this cause non-timestamp URLs to break? I've tested on https://www.youtube.com/watch?v=801uz0f_UAE and the URLs in the video description still work. I think all URLs delivered to the web interface are already found in HTML and scraped and encoded into Spanned, so this function call is unnecessary. But it's possible some URLs fail to survive the pipeline but are regenerated via autolink, and this PR will make them disappear. If so, that's probably a bug hidden by autolink.

I haven't changed :app/build.gradle to point to a different implementation 'com.github.teamnewpipe:NewPipeExtractor:...' revision yet, since I did all local testing using:

includeBuild('../NewPipeExtractor') {
    dependencySubstitution {
        substitute module('com.github.TeamNewPipe:NewPipeExtractor') with project(':extractor')
    }
}

Depends on TeamNewPipe/NewPipeExtractor#188.

@theScrabi theScrabi added the bug Issue is related to a bug label Sep 24, 2019
@B0pol
Copy link
Member

B0pol commented Feb 1, 2020

You should close this @Stypox @TobiGr. It works, but only for YouTube. It breaks all description links for other services.

I'll will implement it with service checking with the future pr for TeamNewPipe/NewPipeExtractor#239.

@TobiGr TobiGr closed this Feb 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Issue is related to a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants